<div style="display: none">
    <div z-edit-global-config="editGlobalConfigWin" z-options="editGlobalConfigOptions"></div>
    <div z-search="search" z-options="optionsSearch"></div>
</div>

<div>
    <h3 class="z-h3">{{ "globalConfig.globalConfig.GLOBAL CONFIGURE" | translate }}</h3>
    <div class="btn-group-sm z-btn-bar">
        <button type="button" class="btn btn-default btn-sm" ng-click="funcRefresh()">
            <i class="fa fa-refresh"></i>
        </button>

        <button type="button" class="btn btn-default btn-sm" ng-click="funcSearch(search)">
            <i class="fa fa-search"></i>
        </button>

        <div z-sort-by z-options="optionsSortBy"></div>

        <button z-popover="popoverFilterBy" type="button" id="globalConfigFilter" z-content-id="globalConfigFilterContent" class="btn btn-default btn-sm" ng-click="filterBy.open(popoverFilterBy)">
            <i class="fa fa-filter"></i><span>&nbsp; {{filterBy.getButtonName()}}</span>
        </button>

        <div id="globalConfigFilterContent" style="display: none">
            <form class="form">
                <div class="form-group">
                    <label for="fieldList" class="z-block-label">{{ "globalConfig.globalConfig.FILTER BY" | translate }}</label>
                    <select id="fieldList" kendo-drop-down-list k-options="filterBy.fieldList" ng-model="filterBy.field"></select>
                </div>
                <div class="form-group">
                    <label class="z-block-label" for="valueList">{{ "globalConfig.globalConfig.VALUE" | translate }}</label>
                    <select kendo-drop-down-list id="valueList" ng-disabled="filterBy.isValueListDisabled()" k-options="filterBy.valueList" ng-model="filterBy.value"></select>
                </div>
                <button type="button" class="btn btn-sm btn-primary" ng-click="filterBy.confirm(popoverFilterBy)">{{ "globalConfig.globalConfig.Confirm" | translate }}</button>
            </form>
        </div>

        <div class="btn-group" ng-show="funcIsActionShow()">
            <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" ng-disabled="funcIsActionDisabled()">
                {{ "globalConfig.globalConfig.Action" | translate }} <span class="caret"></span>
            </button>
            <ul class="dropdown-menu" role="menu">
                <li><a href ng-click="action.edit()">{{ "globalConfig.globalConfig.Edit" | translate }}</a></li>
            </ul>
        </div>
    </div>

    <div kendo-grid="globalConfigGrid" k-options="oGlobalConfigGrid.options" z-grid-double-click="funcGridDoubleClick" class="z-flat-table"></div>
    <p class="z-hint">{{ "globalConfig.globalConfig.HINT1" | translate }}</p>
    <p class="z-hint">{{ "globalConfig.globalConfig.HINT2" | translate }}</p>
</div>
